package com.company.oa.workflow.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.company.oa.workflow.dto.expense.ExpenseDTO;
import com.company.oa.workflow.entity.expense.Expense;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

public interface ExpenseService extends IService<Expense> {
    
    /**
     * 分页查询报销列表
     */
    IPage<Expense> getPage(int page, int size, Expense expense);
    
    /**
     * 创建报销申请（草稿）
     */
    boolean createExpense(ExpenseDTO expenseDTO, Long userId);
    
    /**
     * 更新报销申请
     */
    boolean updateExpense(ExpenseDTO expenseDTO);
    
    /**
     * 提交报销申请
     */
    boolean submitExpense(Long id);
    
    /**
     * 取消报销申请
     */
    boolean cancelExpense(Long id);
    
    /**
     * 上传附件
     */
    String uploadAttachment(MultipartFile file);
    
    /**
     * 获取报销详情
     */
    Map<String, Object> getExpenseDetail(Long id);
    
    /**
     * 获取我的报销列表
     */
    IPage<Expense> getMyExpenses(int page, int size, Long userId, Integer status);
    
    /**
     * 支付报销
     */
    boolean payExpense(Long id, Long userId);
} 